angular.module('usersearch.controller',[])
  .controller('usersearchCtrl',['$scope','$timeout' ,'$localstorage','$ionicPopup','usersearchService','$state','loginService',function($scope,$timeout,$localstorage,$ionicPopup,usersearchService,$state,loginService){

    $scope.userinfo=[];
    $scope.searchData={ Web_Name:'',User_Name:'',Address:''};
    $scope.visible=true; //初始
    $scope.$on('$ionicView.enter', function(event, data) {
          console.log("huodong页进来了");
    });

    $scope.searchUser = function(){
       //var  obj={};
       usersearchService.get_UserInfo($scope.searchData).then(function(data){
	      $scope.userinfo=data;
	    },function(error){
	      var alertPopup=$ionicPopup.alert({
	        title:'获取用户信息失败！',
	        template:"异常错误",
	        okText: '确定', // String (默认: 'OK')。OK按钮的文字。
	        okType: 'item-customer-bg-darkred', // String (默认: 'button-positive')。OK按钮的类型。
	      });
	    });
    }

  }]);
